{if $op == 'index'}
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> 
	<title>升级会员</title>
	<link rel="stylesheet" href="{$_W['siteroot']}/addons/lanye_wd/static/css/reset_mobile.css">
	<link rel="stylesheet" type="text/css" href="{$_W['siteroot']}/addons/lanye_wd/static/css/index.css">
	<script type="text/javascript" src="{$_W['siteroot']}/addons/lanye_wd/static/js/jquery-2.1.4.min.js"></script>
	<script type="text/javascript" src="{$_W['siteroot']}/addons/lanye_wd/static/js/fontsize.js"></script>
	<script src="{$_W['siteroot']}/addons/lanye_wd/static/js/common.js?v={$_W['timestamp']}"></script>
</head>
<body>
	<header id="top">
		<h1>联盟会员</h1>
		<ul class="clearfix">
			<li><img src="{$_W['siteroot']}/addons/lanye_wd/static/images/dui3.png" alt="">自助办卡提额</li>
			<li><img src="{$_W['siteroot']}/addons/lanye_wd/static/images/dui3.png" alt="">网贷每日更新</li>
			<li><img src="{$_W['siteroot']}/addons/lanye_wd/static/images/dui3.png" alt="">高额推广奖励</li>
		</ul>
	</header>
	<article id="content">
		<form action="{php echo $this->createMobileUrl('vip',array('op' => 'submit'))}" class="form"  method="post">
		<h1>请选择会员权限</h1>
		<div class="con">
			<ul class="con_nav clearfix">
				{loop $groups $k $row}
				<li {if $k==0}class="active"{/if} data-price="{$row['price']}" data-hyid="{$row['id']}">{$row['name']}</li>
				{/loop}
			</ul>
			
				<section><label for="">姓名</label><input type="text" placeholder="请输入您的姓名" name="name" ></section>
				<section><label for="">手机号</label><input type="text" placeholder="请输入您的手机号" name="mobile" ></section>
				<section style="position: relative;"><label for="">验证码</label><input type="text" placeholder="请输入验证码" name="code" ><input class="yz_btn" value="获取验证码" type="button"></section>
				<div class="form_text">
					<p class="text1"><img src="{$_W['siteroot']}/addons/lanye_wd/static/images/dui1.png" alt="">我已经阅读并同意</p>
					<p class="text2 clearfix">
						<a href="{php echo $this->createMobileUrl('vip',array('op' => 'contract','contract' =>'contract_title_noe'))}">{$config['contract_title_noe']}</a>
						<a href="{php echo $this->createMobileUrl('vip',array('op' => 'contract','contract' =>'contract_title_tow'))}">{$config['contract_title_tow']}</a>
					</p>
				</div>
			
			<input type="hidden" id="input-group" name="user_id" value="{$user_list['id']}" />
			<input type="hidden" id="input-group" name="group" value="" />
			<input type="hidden" id="input-group" name="yuan_group" value="{$user_list['group']}" />

		</div>
	</article>
	<footer id="footer" class="clearfix">
		<ul>
			<li class="footer_li1">金额：<span></span><p></p>元</li>
			<!-- <li class="foot_btn">立即加入</li> -->
			<input type="submit" name="submit"  class="foot_btn" value="立即加入" style="float: left;width: 50%;height: 1rem;line-height: 1rem;text-align: center;font-size: 0.35rem;" />
		</ul>
	</footer>
	</form>
</body>
</html>
{elseif $op == 'contract'}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>协议</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="{$_W['siteroot']}/addons/lanye_wd/static/images/favicon.ico">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="{$_W['siteroot']}/addons/lanye_wd/static/css/light7.css">
    <link rel="stylesheet" href="{$_W['siteroot']}/addons/lanye_wd/static/css/icon.css">
    <link rel="stylesheet" href="{$_W['siteroot']}/addons/lanye_wd/static/css/style.css?v={$_W['timestamp']}">
</head>

<body  style="background: #fff">
 <div>
    <div class="content" style="bottom:2.5rem">
        {if $contract=='contract_title_noe'}
            {$conf['contract_noe']}
        {/if}
        {if $contract=='contract_title_tow'}
            {$conf['contract_tow']}
        {/if}
    </div>
</div>
{php echo register_jssdk(false);}
<script>
    wx.ready(function () {
        sharedata = {
            title: "{$detail['title']}",
            desc: "{$detail['desc']}",
            link: "{$_W['siteroot']}{php echo $this->createMobileUrl('news',array('op' => 'detail','id' =>$detail['id'],'cc' => $uid))}",
            imgUrl: "{$_W['attachurl']}{$detail['thumb']}",//本域链接
        };
        wx.onMenuShareAppMessage(sharedata);
        wx.onMenuShareTimeline(sharedata);
        wx.onMenuShareQQ(sharedata);
        wx.onMenuShareQZone(sharedata);
        wx.onMenuShareWeibo(sharedata);
    });
</script>
</body>
</html>
{/if}
{php echo register_jssdk(false);} 
<script type="text/javascript">
	wx.ready(function () {
        sharedata = {
            title: "{$config['share_title']}",
            desc: "{$config['share_desc']}",
            link: "{$_W['siteroot']}{php echo $this->createMobileUrl('index',array('cc' => $_W['member']['uid']))}",
            imgUrl: "{$_W['attachurl']}{$config['share_img']}",//本域链接
        };
		wx.onMenuShareAppMessage(sharedata);
		wx.onMenuShareTimeline(sharedata);
		wx.onMenuShareQQ(sharedata);
		wx.onMenuShareQZone(sharedata);
		wx.onMenuShareWeibo(sharedata);
	});

	$(function(){
		$(".con_nav li").click(function(){
	 		$(this).addClass('active').siblings().removeClass('active');
            $(this).addClass('active').parent().siblings().removeClass('active');
		});
		var price = $('.con_nav li.active').data('price');
		$('input[name="group"]').val($('.con_nav li.active').data('hyid'));

		$('.footer_li1').find('span').text(price);
		$('.con_nav').on('click', 'li', function(){
			$('.footer_li1').find('span').text($(this).data('price'));
			$('input[name="group"]').val($(this).data('hyid'));

		});
	    function settime(){
			$('.yz_btn').attr("disabled","disabled");
			var time=59;
			var timer=setInterval(function(){
				var temp=time--;
				$('.yz_btn').attr("value",""+temp+"秒后重新获取");
				if(temp<=0){
					$('.yz_btn').removeAttr("disabled");
					$('.yz_btn').attr("value","获取验证码");
					clearInterval(timer);
					return
				}
			},1000)
	    }
	    //发送短信验证码
	   $('.yz_btn').click(function(){
	   		var mobile=$('input[name="mobile"]').val();
			if(mobile==''){
				alert('请输入手机号')
				return false;
			}
			var pattern_phone = /^1[34578]\d{9}$/; 
			if(!pattern_phone.test(mobile)){
				alert('手机号格式错误')
				return false;
			}
			$.ajax({
	          type : "POST",
	          url : "{php echo $this->createMobileUrl('vip', array('op' => 'VerificationCode'))}",
	          data : {"mobile" :mobile},
	          cache : false,
	          dataType : "json",
	          beforeSend : function() {
	          },
	          success : function(msg) {
	          	if(msg.info==1){
	          		settime(59);
	          	  }
	          }
		     });
			return false;
	   })

		var istongyi = true;
		$('.text1').click(function(){
			if(istongyi){
				$(this).find($("img")).attr("src","{$_W['siteroot']}/addons/lanye_wd/static/images/dui2.png");
				istongyi = false;//同意
				// console.log('同意');
			num=2;
			}else{
				$(this).find($("img")).attr("src","{$_W['siteroot']}/addons/lanye_wd/static/images/dui1.png");
				istongyi = true;//不同意
				// console.log('不同意');
			}
		});


		$('form').submit(function(){
			var name=$('input[name="name"]').val();
	   		if(name==''){
	   			alert('请填写用户名');
	   			return false;
	   		}
			var mobile=$('input[name="mobile"]').val();
			if(mobile==''){
				alert('请输入手机号')
				return false;
			}
			var pattern_phone = /^1[34578]\d{9}$/; 
			if(!pattern_phone.test(mobile)){
				alert('手机号格式错误')
				return false;
			}
	   		var code=$('input[name="code"]').val();
	   		if(code==''){
	   			alert('请填写验证码');
	   			return false;
	   		}
			if(!istongyi){
				alert('请勾选协议');
				return false;
			}

			return true;
		});

	})
</script>